package com.haiyu.manager.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haiyu.manager.pojo.Category2;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.Set;

@Data
public class Category1DTO {

    private Integer category1Id;
    @NotEmpty(message="类别名称不能为空")

    private String category1Name;
    @NotEmpty(message="图片路径不能为空")

    private String category1Picture;

    private String category1Remark;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ccreateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date uupdateTime;
    private  Integer status;
    //一对多关系
    private Set<Category2> category2s ;
}
